package gps.monitor.jt809server.configuration;

import gps.monitor.common.core.base.AbstractServiceConfiguration;
import gps.monitor.common.core.base.AbstractServiceStarter;
import gps.monitor.jt809server.network.netty.SimpleJt809NettyHandler;
import gps.monitor.jt809server.service.DeviceDataService;
import gps.monitor.jt809server.service.DownConnectService;
import gps.monitor.jt809server.service.LinkStatusService;
import gps.monitor.jt809server.service.UpConnectService;
import gps.monitor.jt809server.startup.Jt809ServerStarter;
import org.springframework.context.annotation.Bean;

/**
 * @author cyq
 * @date 2021/11/3
 * @desc talk is cheep,show me the code
 */
public class Jt809ServerConfiguration extends AbstractServiceConfiguration {

    @Override
    @Bean("jt809Server")
    public AbstractServiceStarter starter() {
        return new Jt809ServerStarter();
    }

    @Bean
    public LinkStatusService linkStatusService() {
        return new LinkStatusService();
    }

    @Bean
    public DownConnectService downConnectService() {
        return new DownConnectService();
    }

    @Bean
    public UpConnectService upConnectService() {
        return new UpConnectService();
    }

    @Bean
    public DeviceDataService deviceDataService() {
        return new DeviceDataService();
    }

    @Bean
    public SimpleJt809NettyHandler simpleJt809NettyHandler() {
        return new SimpleJt809NettyHandler();
    }
}
